﻿using UnityEngine;
using System.Collections;

public class ShowFPS : MonoBehaviour
{
    void Awake()
    {
        Application.targetFrameRate = 10;
    }

    int frames;
    float t;

    void Update()
    {
        t += Time.deltaTime;

        if (t >= 1)
        {
            NetProc.Ins.SendFps((ushort)frames);
            t = 0;
            frames = 0;
        }
    }
    void FixedUpdate()
    {
        frames++;
    }

}
